package mylib.archive.y2012.m09.IFMO_Train;

import mylib.dir.ArrayUtils;
import mylib.dir.FastInputReader;
import mylib.dir.OutputUtils;

import java.io.PrintWriter;

public class TaskH {
    public void solve(int testNumber, FastInputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n == 1) {
            out.print(1);
            return;
        }
        if (n == 4) {
            out.print("2 4 1 3");
            return;
        }
        if (n <= 4) {
            out.print("No solution");
        } else {
            boolean[] used = new boolean[n];
            int ans[] = new int[n];
            int ptr = 0;
            int p1 = 0;
            ans[ptr++] = 0;
            ans[ptr++] = 2;
            ans[ptr++] = 4;
            used[0] = used[2] = used[4] = true;
            for (int it = 0; it < n - 3; ++it) {
                if (n % 5 == 2 && n - 3 - it == 3) {
                    ans[ptr++] = n - 2;
                    ans[ptr++] = n - 4;
                    ans[ptr++] = n - 1;
                    break;
                }
                if (n % 5 == 3 && n - 3 - it == 4) {
                    ans[ptr++] = n - 3;
                    ans[ptr++] = n - 1;
                    ans[ptr++] = n - 5;
                    ans[ptr++] = n - 2;
                    break;
                }
                if (n % 5 == 4 && n - 3 - it == 4) {
                    ans[ptr++] = n - 3;
                    ans[ptr++] = n - 1;
                    ans[ptr++] = n - 4;
                    ans[ptr++] = n - 2;
                    break;
                }
                int save = p1;
                while (p1 < n && (used[p1] || Math.abs(ans[ptr - 1] - p1) <= 1))
                    ++p1;
                ans[ptr++] = p1;
                used[p1] = true;
                p1 = save;

                while (p1 < n && used[p1])
                    ++p1;
            }
            ArrayUtils.addToArray(ans, 1);
            OutputUtils.outArray(out, ans);
        }
    }
}
